package org.msfj.admin.feign;

import org.msfj.admin.vo.DeptVo;
import org.msfj.authority.client.configuration.ClientAutoConfiguration;
import org.msfj.common.model.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "admin-service", configuration = {ClientAutoConfiguration.class})
public interface DeptApi {
    /**
     * 根据id查询部门
     *
     * @param id
     * @return
     */
    @RequestMapping("/api/dept/getById")
    CommonResult<DeptVo> getById(@RequestParam("id") String id);

    @RequestMapping("/api/dept/all")
    CommonResult<List<DeptVo>> getAllVo();
}
